<template>
    <div class="test">
        send<br/>
        <span> send msg:{{msg}}</span><br/>
        <button @click="send">发送数据</button>
    </div>
</template>

<script>
    import bus from './eventBus.js';
    export default {
        name: "brother-send",
        data(){
            return {
                msg:'张三来自发送方'
            }
        },
        methods:{
            send(){
                bus.$emit('share',this.msg);
            }
        }
    }
</script>

<style scoped>
    .test{
        float: left;
        width: 50%;
        height: 250px;
        background-color: #5bc0de;
    }
</style>